package com.itheima.insatnce02;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestFly {
	@Test
	public void testMethod() {
		String xmlPath="com/itheima/insatnce02/Flyable.xml";
		ApplicationContext applicationContext = new ClassPathXmlApplicationContext(xmlPath);
		List<Flyable> brid_group =  (List) applicationContext.getBean("brid_group");
		
		
//		Iterator<Flyable> i = brid_group.iterator();
//		while(i.hasNext()) {
//			System.out.print(i);
//			i.next().fly();
//			
//		}
//		brid_group.removeIf(ele ->ele.== true);
		System.out.println();
		System.out.println();
		brid_group.stream().forEach(brid ->{
			brid.fly();
		});
		
	}
}
